package com.sinochem.sales.gateway.service.impl;

import com.netflix.zuul.context.RequestContext;
import com.sinochem.sales.gateway.service.LogSendService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @author xuan
 * @date 2017/11/16
 * 消息发往消息队列工具类
 */
@Component
public class LogSendServiceImpl implements LogSendService {
    private static final String SERVICE_ID = "serviceId";
    private Logger logger = LoggerFactory.getLogger(LogSendServiceImpl.class);
    /*@Autowired
    private AmqpTemplate rabbitTemplate;*/

    /**
     * 1. 获取 requestContext 中的请求信息
     * 2. 如果返回状态不是OK，则获取返回信息中的错误信息
     * 3. 发送到MQ
     *
     * @param requestContext 上下文对象
     */
    @Override
    public void send(RequestContext requestContext) {
        //rabbitTemplate.convertAndSend(MqQueueConstant.LOG_QUEUE, logVo);
    }
}
